package top.ryw.ssm2.service.impl;

import org.springframework.stereotype.Service;
import top.ryw.ssm2.mapper.UserMapper;
import top.ryw.ssm2.pojo.User;
import top.ryw.ssm2.service.UserService;

import javax.annotation.Resource;
import java.util.List;

@Service
public class UserServiceImpl implements UserService {
    @Resource
    private UserMapper userMapper;

    public User getById(int id) {
        return userMapper.selectById(id);
    }

    public int insert(User user) {
        return userMapper.insert(user);
    }

    public List<User> selectList() {
        return userMapper.selectList();
    }
}
